# -*- coding: utf-8 -*
from django import forms
from .models import Topic, Post


class NewTopicForm(forms.ModelForm):
    message = forms.CharField(
        widget=forms.Textarea(
            attrs={'rows': 5, 'placeholder': '你有什么想法?'}
        ),
        max_length=4000,
        help_text='想法多是好事，但是不要超过4000字哦！',
        label='内容'
    )

    class Meta:
        model = Topic
        fields = ['subject', 'message']


class PostForm(forms.ModelForm):
    class Meta:
        model = Post
        fields = ['message', ]





